<?php
	include "upload.class.php";
	$default_dir = dirname(__DIR__).DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'upload';
	$up = array_shift($_FILES);
	$file = new upload($default_dir);
	$result = $file->uploadOne($up);

	if($result['status']){
		echo $result['file'];
	}else{
		echo '000';
	}